using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._EditingTools
{
    /// <summary>
    /// <para>Snap</para>
    /// <para>Moves points or vertices to coincide exactly with the vertices, edges, or end points of other features. Snapping rules can be specified to control whether the input vertices are snapped to the nearest vertex, edge, or endpoint within a specified distance.</para>
    /// <para>移动点或折点以与其他要素的折点、边或端点完全重合。可以指定捕捉规则来控制是否将输入折点捕捉到指定距离内的最近顶点、边或端点。</para>
    /// </summary>    
    [DisplayName("Snap")]
    public class Snap : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Snap()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The input features with the vertices that will be snapped to the vertices, edges, or end points of other features. The input features can be points, multipoints, lines, or polygons.</para>
        /// <para>输入要素的折点将被捕捉到其他要素的折点、边或端点。输入要素可以是点、多点、直线或面。</para>
        /// </param>
        /// <param name="_snap_environment">
        /// <para>Snap Environment</para>
        /// <para><xdoc>
        ///   <para>The feature classes or feature layers containing the features to snap to.</para>
        ///   <para>The snapping environment components are as follows:</para>
        ///   <bulletList>
        ///     <bullet_item>Features—The features that the input features' vertices will be snapped to. These features can be points, multipoints, lines, or polygons.</bullet_item><para/>
        ///     <bullet_item>Type—The type of feature part that the input features' vertices can be snapped to.</bullet_item><para/>
        ///     <bullet_item>Distance—The distance within which the input features' vertices will be snapped to the nearest end point, vertex, or edge.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>Available snapping types are as follows:</para>
        ///   <bulletList>
        ///     <bullet_item>End—Input feature vertices will be snapped to feature ends.</bullet_item><para/>
        ///     <bullet_item>Vertex—Input feature vertices will be snapped to feature vertices.</bullet_item><para/>
        ///     <bullet_item>Edge—Input feature vertices will be snapped to feature edges.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>If a distance is used without a unit (for example, 10 instead of 10 meters), the linear or angular unit from the input feature's coordinate system will be used as the default. If the input features have a projected coordinate system, its linear unit will be used.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>包含要捕捉到的要素的要素类或要素图层。</para>
        ///   <para>捕捉环境组件如下：</para>
        ///   <bulletList>
        ///     <bullet_item>要素 - 输入要素的折点将被捕捉到的要素。这些要素可以是点、多点、线或面。</bullet_item><para/>
        ///     <bullet_item>类型 - 可捕捉到输入要素折点的要素零件的类型。</bullet_item><para/>
        ///     <bullet_item>距离 - 将输入要素的折点捕捉到最近的端点、折点或边的距离。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>可用的捕捉类型如下：</para>
        ///   <bulletList>
        ///     <bullet_item>结束 （End） - 输入要素折点将被捕捉到要素端点。</bullet_item><para/>
        ///     <bullet_item>顶点 - 输入要素折点将被捕捉为要素折点。</bullet_item><para/>
        ///     <bullet_item>边 - 输入要素折点将被捕捉到要素边。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>如果使用不带单位的距离（例如，10 米而不是 10 米），则输入要素坐标系中的线性或角度单位将用作默认单位。如果输入要素具有投影坐标系，则将使用其线性单位。</para>
        /// </xdoc></para>
        /// </param>
        public Snap(object _in_features, object _snap_environment)
        {
            this._in_features = _in_features;
            this._snap_environment = _snap_environment;
        }
        public override string ToolboxName => "Editing Tools";

        public override string ToolName => "Snap";

        public override string CallName => "edit.Snap";

        public override List<string> AcceptEnvironments => ["extent", "workspace"];

        public override object[] ParameterInfo => [_in_features, _snap_environment, _out_feature_class];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input features with the vertices that will be snapped to the vertices, edges, or end points of other features. The input features can be points, multipoints, lines, or polygons.</para>
        /// <para>输入要素的折点将被捕捉到其他要素的折点、边或端点。输入要素可以是点、多点、直线或面。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Snap Environment</para>
        /// <para><xdoc>
        ///   <para>The feature classes or feature layers containing the features to snap to.</para>
        ///   <para>The snapping environment components are as follows:</para>
        ///   <bulletList>
        ///     <bullet_item>Features—The features that the input features' vertices will be snapped to. These features can be points, multipoints, lines, or polygons.</bullet_item><para/>
        ///     <bullet_item>Type—The type of feature part that the input features' vertices can be snapped to.</bullet_item><para/>
        ///     <bullet_item>Distance—The distance within which the input features' vertices will be snapped to the nearest end point, vertex, or edge.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>Available snapping types are as follows:</para>
        ///   <bulletList>
        ///     <bullet_item>End—Input feature vertices will be snapped to feature ends.</bullet_item><para/>
        ///     <bullet_item>Vertex—Input feature vertices will be snapped to feature vertices.</bullet_item><para/>
        ///     <bullet_item>Edge—Input feature vertices will be snapped to feature edges.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>If a distance is used without a unit (for example, 10 instead of 10 meters), the linear or angular unit from the input feature's coordinate system will be used as the default. If the input features have a projected coordinate system, its linear unit will be used.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>包含要捕捉到的要素的要素类或要素图层。</para>
        ///   <para>捕捉环境组件如下：</para>
        ///   <bulletList>
        ///     <bullet_item>要素 - 输入要素的折点将被捕捉到的要素。这些要素可以是点、多点、线或面。</bullet_item><para/>
        ///     <bullet_item>类型 - 可捕捉到输入要素折点的要素零件的类型。</bullet_item><para/>
        ///     <bullet_item>距离 - 将输入要素的折点捕捉到最近的端点、折点或边的距离。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>可用的捕捉类型如下：</para>
        ///   <bulletList>
        ///     <bullet_item>结束 （End） - 输入要素折点将被捕捉到要素端点。</bullet_item><para/>
        ///     <bullet_item>顶点 - 输入要素折点将被捕捉为要素折点。</bullet_item><para/>
        ///     <bullet_item>边 - 输入要素折点将被捕捉到要素边。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>如果使用不带单位的距离（例如，10 米而不是 10 米），则输入要素坐标系中的线性或角度单位将用作默认单位。如果输入要素具有投影坐标系，则将使用其线性单位。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Snap Environment")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _snap_environment { get; set; }


        /// <summary>
        /// <para>Snapped Input Features</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Snapped Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_feature_class { get; set; }


        public Snap SetEnv(object extent = null, object workspace = null)
        {
            base.SetEnv(extent: extent, workspace: workspace);
            return this;
        }

    }

}